import { request } from '@/service/request';

/** 获取游戏记录详情列表 */
export function fetchGetGameRecordDetailList (params?: Api.Games.GameRecordDetailSearchParams) {
    return request<Api.Games.GameRecordDetailList>({
        url: '/games/gameRecordDetail/list',
        method: 'get',
        params
    });
}

/** 新增游戏记录详情 */
export function fetchCreateGameRecordDetail (data: Api.Games.GameRecordDetailOperateParams) {
    return request<boolean>({
        url: '/games/gameRecordDetail',
        method: 'post',
        data
    });
}

/** 修改游戏记录详情 */
export function fetchUpdateGameRecordDetail (data: Api.Games.GameRecordDetailOperateParams) {
    return request<boolean>({
        url: '/games/gameRecordDetail',
        method: 'put',
        data
    });
}

/** 批量删除游戏记录详情 */
export function fetchBatchDeleteGameRecordDetail (detailIds: CommonType.IdType[]) {
    return request<boolean>({
        url: `/games/gameRecordDetail/${detailIds.join(',')}`,
        method: 'delete'
    });
}
